<?php

use Illuminate\Support\Facades\Schema;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;

class CreateFacesTable extends Migration
{
    /**
     * Run the migrations.
     *
     * @return void
     */
    public function up()
    {
        Schema::create('faces', function (Blueprint $table) {
            $table->increments('id');
            $table->string('school_code')->notNull()->default('')->comment('学校code');
            $table->string('card_number')->notNull()->default('')->comment('学号');
            $table->string('nonce')->notNull()->default('')->comment('随机串');
            $table->text('image_url')->comment('微校推送的照片');
            $table->string('face')->notNull()->default('')->comment('图片url');

            $table->timestamps();
        });
    }

    /**
     * Reverse the migrations.
     *
     * @return void
     */
    public function down()
    {
        Schema::dropIfExists('faces');
    }
}
